Fault injection is a software testing technique that improves the coverage of a test by introducing faults to rarely-visited code paths. For example, some error handling code paths are seldom invoked and their behaviors can be difficult to be verified. Additionally, fault injection is an important tool for evaluating the dependability of a software product. A software designer needs to understand the software product's behavior in response to faults to evaluate whether the software is capable of handling the faults.
Conventionally, faults injected into a test code are manually programmed into the test code by a programmer. The test code needs to be recompiled each time a different set of faults is configured. Therefore, faults cannot be easily reconfigured when performing a software test. As a result, it is time-consuming to verify the behavior of a test code under various faulty conditions.